<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>mrtc播放和推流同时存在</title>
</head>
<body>
    <p>播放端</p>
    <div class="play"></div>

    <br>
    <hr>
    <br>

    <p>推流端</p>
    <div class="pub"></div>

    <script src="//static.mudu.tv/static/mrtc-web-sdk/latest/mrtc-web-sdk.js"></script>
    <script>
        var playDom = document.querySelector('.play')
        var pubDom = document.querySelector('.pub')
        var url = localStorage.getItem('mrtc_url') || "mrtc://hw-mrtc.myun.tv/36339512/2"

        play = Mrtc.setup(playDom)
        // pub = Mrtc.setup(pubDom)

        // pub.subscribe('on', function () {
        //     alert('on')
        // })

        // pub.publishCamera(url)
        play.play(url)
    </script>
</body>
</html>
